package org.zebra.beansearch;

import cn.zhxu.bs.BeanMeta;
import cn.zhxu.bs.IllegalParamException;
import cn.zhxu.bs.ParamFilter;

import java.util.Map;

/**
 * 逻辑删除
 *
 * @author zhangongbin
 */
public class LogicDeleteParamFilter implements ParamFilter {

    @Override
    public <T> Map<String, Object> doFilter(BeanMeta<T> beanMeta, Map<String, Object> map)
            throws IllegalParamException {
        if (LogicDeleteSearchBean.class.isAssignableFrom(beanMeta.getBeanClass())) {
            map.put("delFlag", 0);
        }
        return map;
    }
}
